package x.ovo.wechat.bot.http.request.core;

import x.ovo.wechat.bot.common.http.request.ApiRequest;
import x.ovo.wechat.bot.common.http.request.BaseRequest;
import x.ovo.wechat.bot.common.http.session.LoginSession;

import java.util.function.Function;

public class LoginInfoRequest extends ApiRequest<BaseRequest> {

    public LoginInfoRequest(LoginSession session, String url) {
        super(session);
        this.url = url + "&fun=new&version=v2";
        headers.put("Accept", "application/json, text/plain, */*");
        headers.remove("Content-Type");
        headers.remove("Origin");
    }

//    @Override
//    public Map<String, Object> getParameters() {
//        return Map.of("fun", "new");
//    }

    @Override
    public Function<String, BaseRequest> responseHandler() {
        return BaseRequest::from;
    }
}
